﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.ComponentModel;
using WPFExcelReport.Helpers;
using System.Data.SqlClient;
using System.Data.Sql;
using System.Windows.Input;
namespace WPFExcelReport
{
    public partial class THMZU
    {

   
        public THMZU()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VGLLG();
            this.DataContext = MV; 
            InitializeComponent();
               
         }

        public override void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            if (IsLoaded)
                return;
            base.Window_Loaded(sender, e);
        }



        public override void OnEXAUFChg(string vlaue)
        {
            TBMain.Clear();
            if (EXAUF.Length < 10)
                return;
            dwData = TBMain.NewRow();
            dwData["GLMANDANT"] = app.Mandant;
            dwData["GLLO"] = EXAUF.Substring(10,2);
            dwData["GLLB"] = EXAUF.Substring(12,2);
            dwData["GLLP"] = EXAUF.Substring(14);
            dwData["GLLBEHI"] = EXAUF.Substring(0,10); 
            SResult = TMV.QGLLG12(dwData);
            MergeData(SResult, true);
            base.OnEXAUFChg(vlaue);
        }
       
       
       
    }
}
